import { userInfo   } from '@/api/login'
import { getRefCode } from '@/utils/auth'

export default {
	data() {
    return {
      title: '我的微信分享',
	  path:'pages/index/index',
	  imageUrl: "/static/tx4.jpg",
    }
  },
  created() {
		uni.showShareMenu({
			withShareTicket: true,
			menus: ['shareAppMessage', 'shareTimeline']
		});
  },
     //2.配置分享好友
	onShareAppMessage(res) {
		console.log("========onShareAppMessage======")
		var tmptitle = '读心AI分享体验'
		console.log("========onShareAppMessage======")
		var url = 'pages/login/login?refcode=' + getRefCode()
		console.log( url )
		return {
			title: tmptitle,
			//path:'pages/index/index',
			path: url,
			imageUrl: "/static/nindex.png",
		}
	},
    //2.配置分享到朋友圈
	onShareTimeline(res) {
		console.log("========onShareTimeline======")
		var tmptitle = '读心AI感知人心'
		var url = 'pages/login/login?refcode=' + getRefCode()
		console.log( url )
		return {
			title: tmptitle,
			//path:'pages/index/index',
			path: url,
			imageUrl: "/static/nindex.png",
		}
	}
}


